home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / inet / internet-drafts / draft-ietf-telnet-envmnt-option-00.txt < prev    next >
Text File  |  1993-04-05  |  16KB  |  405 lines

  1.  
  2.  
  3.  
  4. Network Working Group                               S. Alexander, Editor
  5. Internet-Draft                                  Lachman Technology, Inc.
  6.                                                               April 1993
  7.  
  8.  
  9.                        Telnet Environment Option                          
  10.  
  11. Status of this Memo
  12.  
  13.    This document is an Internet Draft.  Internet Drafts are working       
  14.    documents of the Internet Engineering Task Force (IETF), its Areas,
  15.    and its Working Groups. Note that other groups may also distribute
  16.    working documents as Internet Drafts.
  17.  
  18.    Internet Drafts are draft documents valid for a maximum of six
  19.    months. Internet Drafts may be updated, replaced, or obsoleted by
  20.    other documents at any time.  It is not appropriate to use Internet
  21.    Drafts as reference material or to cite them other than as a "working
  22.    draft" or "work in progress."
  23.  
  24.    Please check the 1id-abstracts.txt listing contained in the
  25.    internet-drafts Shadow Directories on nic.ddn.mil, nnsc.nsf.net,
  26.    nic.nordu.net, ftp.nisc.sri.com, or munnari.oz.au to learn the
  27.    current status of any Internet Draft.                                  
  28.  
  29. Abstract
  30.  
  31.    This document specifies a mechanism for passing environment
  32.    information between a telnet client and server.  Use of this
  33.    mechanism enables a telnet user to propagate configuration
  34.    information to a remote host when connecting.                          
  35.  
  36.    This document corrects some errors in [1].                             |
  37.  
  38. 1.  Command Names and Codes
  39.  
  40.       ENVIRON         36
  41.           IS               0
  42.           SEND             1
  43.           INFO             2
  44.  
  45.           VALUE            0                                              |
  46.           VAR              1                          |
  47.           ESC              2
  48.           USERVAR          3
  49.  
  50. 2.  Command Meanings 
  51.  
  52.  
  53.  
  54.                           Expires October 1993                  [Page 1]
  55.  
  56. Internet-Draft         Telnet Environment Option              April 1993
  57.  
  58.  
  59.    IAC WILL ENVIRON
  60.  
  61.       The sender of this command is willing to send environment
  62.       variables.
  63.  
  64.    IAC WONT ENVIRON
  65.  
  66.       The sender of this command refuses to send environment variables.
  67.  
  68.    IAC DO ENVIRON
  69.  
  70.       The sender of this command is willing to receive environment
  71.       variables.
  72.  
  73.    IAC DONT ENVIRON
  74.  
  75.       The sender of this command refuses to accept environment
  76.       variables.
  77.  
  78.    IAC SB ENVIRON SEND [ type ... [ type ... [ ... ] ] ] IAC SE
  79.  
  80.       The sender of this command requests that the remote side send its
  81.       environment variables.  The "type" may be either VAR or USERVAR,
  82.       to indicate either well known or user variable names.  Only the
  83.       side that is DO ENVIRON may initiate a SEND command.  If a list of
  84.       variables is specified, then only those variables should be sent.
  85.       If no list is specified, then the default environment, of both
  86.       well known and user defined variables, should be sent.  If one of
  87.       the variables has no name, then all the variables of that type
  88.       (well known or user defined)  in the default environment should be
  89.       sent.
  90.  
  91.    IAC SB ENVIRON IS type ... [ VALUE ... ] [ type ... [ VALUE ... ] [
  92.    ... ] ] IAC SE
  93.  
  94.       The sender of this command is sending environment variables.  This
  95.       command is sent in response to a SEND request.  Only the side that
  96.       is WILL ENVIRON may send an IS command.  The "type"/VALUE pairs
  97.       must be returned in the same order as the SEND request specified
  98.       them, and there must be a response for each "type ..." explicitly
  99.       requested.  The "type" will be VAR or USERVAR.  Multiple
  100.       environment variables may be sent.  The characters following a
  101.       "type" up to the next "type" or VALUE specify the variable name.
  102.       The characters following a VALUE up to the next "type" specify the
  103.       value of the variable.  If a "type" is not followed by a VALUE
  104.       (e.g., by another VAR, USERVAR, or IAC SE) then that variable is
  105.       undefined.  If a VALUE is immediately followed by a "type" or IAC,
  106.       then the variable is defined, but has no value.  If an IAC is
  107.       contained between the IS and the IAC SE, it must be sent as IAC
  108.       IAC.  If a variable or a value contains a VAR, it must be sent as
  109.  
  110.  
  111.  
  112.                           Expires October 1993                  [Page 2]
  113.  
  114. Internet-Draft         Telnet Environment Option              April 1993
  115.  
  116.  
  117.       ESC VAR.  If a variable or a value contains a USERVAR, it must be
  118.       sent as ESC USERVAR.  If a variable or a value contains a VALUE,
  119.       it must be sent as ESC VALUE.  If a variable or a value contains
  120.       an ESC, it must be sent as ESC ESC.
  121.  
  122.    IAC SB ENVIRON INFO type ... [ VALUE ... ] [ type ... [ VALUE ... ] [
  123.    ... ] ] IAC SE
  124.  
  125.       The sender of this command is sending information about
  126.       environment variables that have changed.  It is identical to the
  127.       IS command, except that the command is INFO instead of IS.  Only
  128.       the side that is WILL ENVIRON may send an INFO command.  The INFO
  129.       command is not to be used to send initial information; the SEND/IS
  130.       sequence is to be used for that.  The INFO command is to be used
  131.       to propagate changes in environment variables, and may be
  132.       spontaneously generated.
  133.  
  134.  
  135. 3.  Default Specification
  136.  
  137.    The default specification for this option is
  138.  
  139.       WONT ENVIRON
  140.       DONT ENVIRON
  141.  
  142.    meaning there will not be any exchange of environment information.
  143.  
  144. 4.  Motivation
  145.  
  146.    Many operating systems have startup information and environment
  147.    variables that contain information that should be propagated to
  148.    remote machines when Telnet connections are established.  Rather than
  149.    create a new Telnet option each time someone comes up with some new
  150.    information that they need propagated through a Telnet session, but
  151.    that the Telnet session itself doesn't really need to know about,
  152.    this generic information option can be used.
  153.  
  154. 5.  Well Known Variables
  155.  
  156.    USER        This variable is used to transmit the user or account
  157.                name that the client wishes to log into on the remote
  158.                system.  The format of the value the USER variable is
  159.                system dependent, as determined by the remote system.
  160.  
  161.    JOB         This variable is used to transmit the job ID that the
  162.                client wishes to use when logging into the remote system.
  163.                The format of the value the JOB variable is system
  164.                dependent, as determined by the remote system.
  165.  
  166.    ACCT        This variable is used to transmit the account ID that the
  167.  
  168.  
  169.  
  170.                           Expires October 1993                  [Page 3]
  171.  
  172. Internet-Draft         Telnet Environment Option              April 1993
  173.  
  174.  
  175.                client wishes to use when logging into the remote system.
  176.                The format of the value the ACCT variable is system
  177.                dependent, as determined by the remote system.
  178.  
  179.    PRINTER     This variable is used to identify the default location
  180.                for printer output.  Because there does not currently
  181.                exist a standard way of naming a printer on a network,
  182.                the format of this variable is currently undefined.
  183.  
  184.    SYSTEMTYPE  This is used to transmit the type of operating system on
  185.                the system that sends this variable.  It value is
  186.                identical to the value of the SYSTEM (SYST) command in     
  187.                FTP [3].  The format of the value shall have as its first  |
  188.                word one of the system names listed in the current
  189.                version of the Assigned Numbers document [4].              |
  190.  
  191.    DISPLAY     This variable is used to transmit the X display location
  192.                of the client.  The format for the value of the DISPLAY
  193.                variable is:
  194.                   <host>:<dispnum>[.<screennum>]
  195.                This information is identical to the information passed
  196.                using the Telnet X-DISPLAY-LOCATION option.  If both the
  197.                DISPLAY environment variable, and the X-DISPLAY-LOCATION   
  198.                option [5] are received, and they contain conflicting      |
  199.                information, the most recently received information
  200.                received should be used.                                   |
  201.  
  202.  
  203.    Because it is impossible to anticipate all variables that users may
  204.    wish to exchange, the USERVAR type is provided to allow users to
  205.    transmit arbitrary variable/value pairs.  The use of an additional
  206.    type allows implementations to distinguish between values derived by
  207.    the remote host software and values supplied by the user.  Paranoid
  208.    implementations will most likely treat both types with an equal level
  209.    of distrust.  The results of a name-space collision between a well-
  210.    known and a user variable are implementation specific.
  211.  
  212. 6.  Implementation Rules
  213.  
  214.    WILL and DO are used only at the beginning of the connection to
  215.    obtain and grant permission for future negotiations.
  216.  
  217.    Once the two hosts have exchanged a WILL and a DO, the sender of the
  218.    DO ENVIRON is free to request that environment variables be sent.
  219.    Only the sender of the DO may send requests (IAC SB ENVIRON SEND IAC
  220.    SE) and only the sender of the WILL may transmit actual environment
  221.    information (via the IAC SB ENVIRON IS ... IAC SE command).  Though
  222.    this option may be used at anytime throughout the life of the telnet
  223.    connection, the exchange of environment information will usually
  224.    happen at the startup of the connection.  This is because many
  225.  
  226.  
  227.  
  228.                           Expires October 1993                  [Page 4]
  229.  
  230. Internet-Draft         Telnet Environment Option              April 1993
  231.  
  232.  
  233.    operating systems only have mechanisms for propagating environment
  234.    information at process creation, so the information is needed before
  235.    the user logs in.
  236.  
  237.    The receiving host is not required to put all variables that it
  238.    receives into the environment.  For example, if the client should
  239.    send across USERVAR "TERM" VALUE "xterm" as an environment variable,   |
  240.    and the TERMINAL-TYPE [2] option has already been used to determine
  241.    the terminal type, the server may safely ignore the TERM variable.
  242.    Also, some startup information may be used in other ways; for
  243.    example, the values for "USER", "ACCT" and "PROJ" values might be
  244.    used to decide which account to log into, and might never be put into
  245.    the users environment.  In general, if the server has already
  246.    determined the value of an environment variable by some more accurate
  247.    means, or if it does not understand a variable name, it may ignore
  248.    the value sent in the ENVIRON option.  The server may also prefer to
  249.    just put all unknown information into the users environment.  This is
  250.    the suggested method of implementation, because it allows the user
  251.    the most flexibility.
  252.  
  253.    The following is an example of use of the option:
  254.  
  255.        Host1                            Host2
  256.        IAC DO ENVIRON
  257.                                         IAC WILL ENVIRON
  258.        [ Host1 is now free to request environment information ]
  259.        IAC SB ENVIRON SEND VAR "USER"
  260.        VAR "ACCT" VAR USERVAR IAC SE
  261.        [ The server has now explicitly asked for the USER and ACCT
  262.          variables, the default set of well known environment variables,
  263.          and the default set of user defined variables.  Note that the
  264.          client includes the USER information twice; once because it was
  265.          explicitly asked for, and once because it is part of the
  266.          default environment.  ]
  267.                                         IAC SB ENVIRON IS VAR "USER"
  268.                                         VALUE "joe" VAR "ACCT" VALUE
  269.                                         "kernel" VAR "USER" VALUE "joe"
  270.                                         VAR "DISPLAY" VALUE "foo:0.0"
  271.                                         USERVAR "SHELL" VALUE "/bin/csh"
  272.                                         IAC SE
  273.  
  274.    It is legal for a client to respond with an empty environment (no
  275.    data between the IAC SB and IAC SE) when no well-defined or user
  276.    variables are currently defined.  For example:
  277.  
  278.       IAC SB ENVIRON IS IAC SE
  279.  
  280.    is a valid response to any of the following:
  281.  
  282.       IAC SB ENVIRON SEND IAC SE
  283.  
  284.  
  285.  
  286.                           Expires October 1993                  [Page 5]
  287.  
  288. Internet-Draft         Telnet Environment Option              April 1993
  289.  
  290.  
  291.       IAC SB ENVIRON SEND VAR IAC SE
  292.       IAC SB ENVIRON SEND USERVAR IAC SE
  293.       IAC SB ENVIRON SEND VAR USERVAR IAC SE
  294.  
  295.    (The last example is equivalent to the first...)
  296.  
  297.    The earlier version of this specification [1] incorrectly enumerated   |
  298.    the values for VAR and VALUE.  This put the specification at odds      |
  299.    with the existing implementations.  In order to interoperate with      |
  300.    implementations that follow [1], software written according to this    |
  301.    document SHOULD accept either VAR or VALUE immediately after a SEND    |
  302.    or IS.  In addition, new implementations should accept either VALUE    |
  303.    or VAR immediately following the name of a VAR or USERVAR.             |
  304.    Implementors of [1] are strongly encouraged to update their            |
  305.    implementations.                                                       |
  306.  
  307.    It is expected that any implementation that supports the Telnet
  308.    ENVIRON option will support all of this specification.
  309.  
  310. 7.  Security Concerns
  311.  
  312.    It is important for an implementor of the ENVIRON option to
  313.    understand the interaction of setting options and the
  314.    login/authentication process. Specifically careful analysis should be
  315.    done to determine which variables are "safe" to set prior to having    |
  316.    the client login.  An example of a bad choice would be permitting a
  317.    variable to be changed that allows an intruder to circumvent or
  318.    compromise the login/authentication program itself.
  319.  
  320. 8.  References
  321.  
  322.    [1] Borman, D., "Telnet Environment Option", RFC 1408, Cray Research,  |
  323.        Inc., January 1993.                                                |
  324.  
  325.    [2] VanBokkelen, J., "Telnet Terminal-Type Option", RFC 1091, FTP
  326.        Software, Inc., February 1989.                                     |
  327.  
  328.    [3] Postel, J. and J. Reynolds, "File Transfer Protocol (FTP)", STD    |
  329.        9, RFC 959, USC/Information Sciences Institute, October 1985.      |
  330.  
  331.    [4] Reynolds, J. and J. Postel, "Assigned Numbers", STD 2, RFC 1340,   |
  332.        USC/Information Sciences Institute, July 1992.                     |
  333.  
  334.    [5] Marcy, G., "Telnet X Display Location Option", RFC 1096, Carnegie
  335.        Mellon University, March 1989.
  336.  
  337.  
  338. Acknowledgements                                                          |
  339.  
  340.    The original version of this document was written by Dave Borman of    |
  341.  
  342.  
  343.  
  344.                           Expires October 1993                  [Page 6]
  345.  
  346. Internet-Draft         Telnet Environment Option              April 1993
  347.  
  348.  
  349.    Cray Research, Inc.  In addition, the comments of the Telnet Working   |
  350.    Group are gratefully acknowledged.
  351.  
  352. Security Considerations                                                   |
  353.  
  354.    Security issues are discussed in Section 7.                            |
  355.  
  356. Editor's Address                                                          |
  357.  
  358.    Steve Alexander
  359.    Lachman Technology, Inc.                                               |
  360.    1901 North Naper Boulevard
  361.    Naperville, IL 60563-8895
  362.  
  363.    Phone: (708) 505-9555 x256                                             |
  364.    EMail: stevea@lachman.com                                              |
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.                           Expires October 1993                  [Page 7]
  403.  
  404.  
  405.